#include <stdio.h>
#include <stdlib.h>

#define NMAX 7000

void
Selection_sort(int* a, int n)
{
	register int i, k, min_k, tmp;

	for (i = 0 ; i < n - 1 ; ++i) {
		min_k = i+1;
		for (k = i + 1 ; k < n ; ++k) {
			if (a[k] < a[min_k]) {
				min_k = k;
			}
		}

		tmp      = a[i];
		a[i]     = a[min_k];
		a[min_k] = tmp;
	}
}

int
main(void)
{
	int n, array[NMAX];
	register int i = 0;

	freopen("selection.in", "r", stdin);
	freopen("selection.out", "w", stdout);

	scanf("%d", &n);
	while (i < n)
		scanf("%d", &array[i++]);

	Selection_sort(array, n);

	i = 0;
	while (i<n)
		printf("%d ", array[i++]);
	return 0;
}
